From f2bf5d4f1160617abfd2c76ba10bc4e19b8f0205 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Fri, 1 Sep 2017 00:02:32 +0200 Subject: [PATCH] babl: change MAX_BUFFER_SIZE to 512 This is the value that determins the smaller size big buffers are broken up in and processed chunk-by chunk for multi-path conversions. With tools/babl-benchmark for a particular workload and machine the following results were attained, all values are in mb/s. There seem to be two sweet-spots one around 128 and one around 512. Now using 512 which probably has better cache behavior on most cpus than the old value 2048. MAX_BUFFER_SIZE benchmarks, 8: 437.1 16: 458.8 32: 495.0 64: 482.6 96: 496.4 127: 508.8 128: 514.2 506.7 495.1 130: 494.6 150: 479.5 255: 492.2 256: 491.0 486.8 384: 500.8 450: 503.7 500: 499.6 496.5 511: 477.8 512: 511.0 508.7 500.6 514: 499.3 515: 504.7 502 520: 512.9 491 530: 501.8 550: 483.3 768: 493.0 1024: 491.6 2048: 489.5 4096: 501.2 8192: 499.0 --- babl/babl-fish-path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/babl/babl-fish-path.c b/babl/babl-fish-path.c index 1dd8516..202778a 100644 --- a/babl/babl-fish-path.c +++ b/babl/babl-fish-path.c @@ -31,7 +31,7 @@ #endif #define NUM_TEST_PIXELS (babl_get_num_path_test_pixels ()) -#define MAX_BUFFER_SIZE 2048 /* XXX: reasonable size for this should be profiled */ +#define MAX_BUFFER_SIZE 512 int babl_in_fish_path = 0; -- 2.30.2